#ifndef PLAYBACKSDK_H
#define PLAYBACKSDK_H

//#include <objbase.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef int PLAYBACKSESSION;
typedef int (__cdecl *DataProviderCallBack)(PLAYBACKSESSION session, DWORD id, unsigned char *bufferPtr, UINT len);

#define DLLSPEC __declspec(dllimport)

DLLSPEC PLAYBACKSESSION __cdecl CreateWindowsMediaFilePlayer(const char *filename);
DLLSPEC PLAYBACKSESSION __cdecl CreateH264FileStreamPlayer(const char *filename, UINT fps);
DLLSPEC PLAYBACKSESSION __cdecl CreateH264BitStreamPlayer(DataProviderCallBack dataProvider, UINT fps, DWORD id);
DLLSPEC PLAYBACKSESSION __cdecl CreateH264BitStreamPlayerWithSize(DataProviderCallBack dataProvider, UINT width, UINT height, UINT fps);
DLLSPEC void __cdecl ClosePlaybackSession(PLAYBACKSESSION session);
DLLSPEC void __cdecl CloseAllPlaybackSession();
DLLSPEC int __cdecl IsSessionPlaying(PLAYBACKSESSION session);
DLLSPEC int __cdecl SeekToPosition(PLAYBACKSESSION session, DWORD position);
DLLSPEC int __cdecl SetOutputPosition(PLAYBACKSESSION session, HWND hwnd, int x, int y, int width, int height);
DLLSPEC int __cdecl StartPlayback(PLAYBACKSESSION session);
DLLSPEC void __cdecl StopPlayback(PLAYBACKSESSION session);
DLLSPEC void __cdecl PausePlayback(PLAYBACKSESSION session);
DLLSPEC int __cdecl SaveSnapShot(PLAYBACKSESSION session, const char *filename);
DLLSPEC int __cdecl GetSnapShot(PLAYBACKSESSION session, char *buf, UINT bufSize);
DLLSPEC int __cdecl GetSnapShotSize(PLAYBACKSESSION session);

#ifdef __cplusplus
}
#endif


#endif 